<?php
namespace Home\Controller;

use Think\Controller;
use Think\Verify;

class CodeController extends Controller
{
   /**
    * 获取验证码
    * @author Mr.Alien
    * @return string
    */
    public function index()
    {
        $config =    array(
            'fontSize'    =>    20,    // 验证码字体大小
            'length'      =>    4,     // 验证码位数
            'useNoise'    =>    false, // 关闭验证码杂点
            'codeSet'     => '0123456789',
            'imageH'  =>40,
            'useCurve'=>false
        );
        $verify = new Verify($config);
        $verify->entry();
    }
}